package com.cjkj.common.core.constant;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * 用户常量信息
 */
public class UserConstants
{
    /**
     * 平台内系统用户的唯一标志
     */
    public static final String SYS_USER = "SYS_USER";

    /** 正常状态 */
    public static final String NORMAL = "0";

    /** 异常状态 */
    public static final String EXCEPTION = "1";

    /** 用户封禁状态 */
    public static final String USER_DISABLE = "1";

    /** 角色封禁状态 */
    public static final String ROLE_DISABLE = "1";

    /** 部门正常状态 */
    public static final String DEPT_NORMAL = "0";

    /** 部门停用状态 */
    public static final String DEPT_DISABLE = "1";

    /** 字典正常状态 */
    public static final String DICT_NORMAL = "0";

    /** 是否为系统默认（是） */
    public static final String YES = "Y";

    /** 是否菜单外链（是） */
    public static final String YES_FRAME = "0";

    /** 是否菜单外链（否） */
    public static final String NO_FRAME = "1";

    /** 菜单类型（目录） */
    public static final String TYPE_DIR = "M";

    /** 菜单类型（菜单） */
    public static final String TYPE_MENU = "C";

    /** 菜单类型（按钮） */
    public static final String TYPE_BUTTON = "F";

    /** Layout组件标识 */
    public final static String LAYOUT = "Layout";

    /** ParentView组件标识 */
    public final static String PARENT_VIEW = "ParentView";

    /** InnerLink组件标识 */
    public final static String INNER_LINK = "InnerLink";

    /** 校验是否唯一的返回标识 */
    public final static boolean UNIQUE = true;
    public final static boolean NOT_UNIQUE = false;

    /**
     * 用户名长度限制
     */
    public static final int USERNAME_MIN_LENGTH = 2;

    public static final int USERNAME_MAX_LENGTH = 20;

    /**
     * 密码长度限制
     */
    public static final int PASSWORD_MIN_LENGTH = 5;

    public static final int PASSWORD_MAX_LENGTH = 20;

    /**
     * 用户类型
     * （00=医院账号，01=医生账号）
     */
    public static final String USER_TYPE_HOSPITAL = "00";
    public static final String USER_TYPE_DOCTOR = "01";

    /**
     * 角色信息
     */
    public static final Set<String> HOSPITAL_ROLES = new HashSet<>(Collections.singletonList("hospital"));
    public static final Set<String> DOCTOR_ROLES = new HashSet<>(Collections.singletonList("doctor"));

    /**
     * 权限信息
     */
    public static final Set<String> HOSPITAL_PERMISSIONS = new HashSet<>(
        Arrays.asList(
            "system:dept:list",
            "system:dept:edit",
            "system:user:list",
            "system:user:remove",
            "system:dept:remove",
            "system:dept:query",
            "system:user:edit",
            "system:user:query",
            "system:dept:add",
            "system:user:add",
            "hospital:equipment:distribution"
        )
    );
    public static final Set<String> DOCTOR_PERMISSIONS = new HashSet<>();

    /**
     * 路由信息
     */
    public static final String TJ01_HOSPITAL_ROUTERS = "[{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者列表\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientList\",\"path\":\"patientList\",\"hidden\":false,\"component\":\"views/PatientREG/patientList\",\"meta\":{\"title\":\"患者列表\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Dept\",\"path\":\"/dept\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"科室管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"DeptPage\",\"path\":\"deptPage\",\"hidden\":false,\"component\":\"views/Dept/dept\",\"meta\":{\"title\":\"科室管理\",\"icon\":\"svg-icon:dept\",\"noCache\":false,\"link\":null}}]},{\"name\":\"User\",\"path\":\"/user\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"用户管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"UserPage\",\"path\":\"userPage\",\"hidden\":false,\"component\":\"views/User/user\",\"meta\":{\"title\":\"用户管理\",\"icon\":\"svg-icon:user\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";
    public static final String TJ01_DOCTOR_ROUTERS = "[{\"name\":\"PatientREG\",\"path\":\"/patientREG\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者登记\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"RegPage\",\"path\":\"regPage\",\"hidden\":false,\"component\":\"views/PatientREG/patientREG\",\"meta\":{\"title\":\"患者登记\",\"icon\":\"svg-icon:patientREG\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientPage\",\"path\":\"patientPage\",\"hidden\":false,\"component\":\"views/Patient/patient\",\"meta\":{\"title\":\"患者管理\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";
    public static final String TJ02_HOSPITAL_ROUTERS = "[{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者列表\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientList\",\"path\":\"patientList\",\"hidden\":false,\"component\":\"views/PatientREG/patientList\",\"meta\":{\"title\":\"患者列表\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Dept\",\"path\":\"/dept\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"科室管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"DeptPage\",\"path\":\"deptPage\",\"hidden\":false,\"component\":\"views/Dept/dept\",\"meta\":{\"title\":\"科室管理\",\"icon\":\"svg-icon:dept\",\"noCache\":false,\"link\":null}}]},{\"name\":\"User\",\"path\":\"/user\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"用户管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"UserPage\",\"path\":\"userPage\",\"hidden\":false,\"component\":\"views/User/user\",\"meta\":{\"title\":\"用户管理\",\"icon\":\"svg-icon:user\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";
    public static final String TJ02_DOCTOR_ROUTERS = "[{\"name\":\"PatientREG\",\"path\":\"/patientREG\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者登记\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"RegPage\",\"path\":\"regPage\",\"hidden\":false,\"component\":\"views/PatientREG/patientREG\",\"meta\":{\"title\":\"患者登记\",\"icon\":\"svg-icon:patientREG\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientPage\",\"path\":\"patientPage\",\"hidden\":false,\"component\":\"views/Patient/patient\",\"meta\":{\"title\":\"患者管理\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Set\",\"path\":\"/set\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"参数设置\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"SetPage\",\"path\":\"setPage\",\"hidden\":false,\"component\":\"views/Set/index\",\"meta\":{\"title\":\"参数设置\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";
    public static final String TJ03_HOSPITAL_ROUTERS = "[{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者列表\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientList\",\"path\":\"patientList\",\"hidden\":false,\"component\":\"views/PatientREG/patientList\",\"meta\":{\"title\":\"患者列表\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Dept\",\"path\":\"/dept\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"科室管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"DeptPage\",\"path\":\"deptPage\",\"hidden\":false,\"component\":\"views/Dept/dept\",\"meta\":{\"title\":\"科室管理\",\"icon\":\"svg-icon:dept\",\"noCache\":false,\"link\":null}}]},{\"name\":\"User\",\"path\":\"/user\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"用户管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"UserPage\",\"path\":\"userPage\",\"hidden\":false,\"component\":\"views/User/user\",\"meta\":{\"title\":\"用户管理\",\"icon\":\"svg-icon:user\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";
    public static final String TJ03_DOCTOR_ROUTERS = "[{\"name\":\"PatientREG\",\"path\":\"/patientREG\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者登记\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"RegPage\",\"path\":\"regPage\",\"hidden\":false,\"component\":\"views/PatientREG/patientREG\",\"meta\":{\"title\":\"患者登记\",\"icon\":\"svg-icon:patientREG\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Patient\",\"path\":\"/patient\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"患者管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"PatientPage\",\"path\":\"patientPage\",\"hidden\":false,\"component\":\"views/Patient/patient\",\"meta\":{\"title\":\"患者管理\",\"icon\":\"svg-icon:peoples\",\"noCache\":false,\"link\":null}}]},{\"name\":\"Eq\",\"path\":\"/eq\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"设备管理\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"EqPage\",\"path\":\"eqPage\",\"hidden\":false,\"component\":\"views/Eq/eq\",\"meta\":{\"title\":\"设备管理\",\"icon\":\"svg-icon:eq\",\"noCache\":false,\"link\":null}}]},{\"name\":\"My\",\"path\":\"/my\",\"hidden\":false,\"redirect\":\"noRedirect\",\"component\":\"Layout\",\"alwaysShow\":true,\"meta\":{\"title\":\"个人中心\",\"icon\":\"#\",\"noCache\":false,\"link\":null},\"children\":[{\"name\":\"MyPage\",\"path\":\"myPage\",\"hidden\":false,\"component\":\"views/MyInfo/myInfo\",\"meta\":{\"title\":\"个人中心\",\"icon\":\"svg-icon:position\",\"noCache\":false,\"link\":null}}]}]";

}
